package com.db.person.service;

import com.db.person.bean.User_inf;
import com.db.person.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements IUserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public User_inf login(String loginname, String password) {
        return userMapper.login(loginname,password);
    }

    @Override
    public void regist(User_inf user_inf) {
        userMapper.regist(user_inf);
    }

    @Override
    public User_inf getByEmail(String loginname, String username, String email) {
        return userMapper.getByEmail(loginname,username,email);
    }

    @Override
    public void setPwd(String loginname, String password) {
        userMapper.setPwd(loginname,password);
    }

    @Override
    public User_inf getByLoginname(String loginname) {
        return userMapper.getByLoginname(loginname);
    }

    @Override
    public List<User_inf> getAll() {
        return userMapper.getAll();
    }

    @Override
    public User_inf getById(Integer id) {
        return userMapper.getById(id);
    }

    @Override
    public void setSomeById(User_inf user_inf) {
        userMapper.setSomeById(user_inf);
    }

    @Override
    public void deleteById(Integer id) {
        userMapper.deleteById(id);
    }
}
